package com.example.weight.model;

import com.bin.david.form.annotation.SmartColumn;
import com.bin.david.form.annotation.SmartTable;

@SmartTable(name="")
public class FaultModel {
    @SmartColumn(id = 0, name = "系统名称")
    private String system;
    @SmartColumn(id = 1, name = "设备名称")
    private String equipment;
    @SmartColumn(id = 2, name = "故障发生时间")
    private String occurTime;

    private String step;

    private String description;

    private String personInCharge;

    private String id;

    public FaultModel(String id, String system, String equipment, String occurTime,
                      String step, String description, String personInCharge) {
        this.id = id;
        this.system = system;
        this.equipment = equipment;
        this.occurTime = occurTime;
        this.step = step;
        this.description = description;
        this.personInCharge = personInCharge;
    }

    public String toString() {
        return "负责人："+personInCharge+"\n"+
                "系统名称："+system+"\n"+
                "设备名称："+equipment+"\n"+
                "故障发生时间："+occurTime+"\n"+
                "阶段："+step+"\n"+
                "故障描述："+description;
    }

    public String toJSON() {
        return "{"+"\"id\":\""+id+"\","+
                "\"system\":\""+system+"\","+
                "\"equipment\":\""+equipment+"\","+
                "\"occurTime\":\""+occurTime+"\","+
                "\"step\":\""+step+"\","+
                "\"description\":\""+description+"\","+
                "\"personInCharge\":\""+personInCharge+"\"}";
    }

    public String toSplitWithSpace() {
        return id+" "+
                system+" "+
                equipment+" "+
                occurTime+" "+
                step+" "+
                description+" "+
                personInCharge;
    }

    public String getPersonInCharge() {
        return personInCharge;
    }

    public void setPersonInCharge(String personInCharge) {
        this.personInCharge = personInCharge;
    }

    public String getSystem() {
        return system;
    }

    public void setSystem(String system) {
        this.system = system;
    }

    public String getEquipment() {
        return equipment;
    }

    public void setEquipment(String equipment) {
        this.equipment = equipment;
    }

    public String getOccurTime() {
        return occurTime;
    }

    public void setOccurTime(String occurTime) {
        this.occurTime = occurTime;
    }

    public String getStep() {
        return step;
    }

    public void setStep(String step) {
        this.step = step;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
